package com.IT.service.Impl;

import com.IT.dao.AdminFunctionDao;
import com.IT.dao.Impl.AdminFunctionDaoImpl;
import com.IT.entity.Log;
import com.IT.entity.Medicine;
import com.IT.entity.User;
import com.IT.service.AdminFunctionService;

import java.util.List;

public class AdminFunctionServiceImpl implements AdminFunctionService {
    private AdminFunctionDao adminFunctionDao = new AdminFunctionDaoImpl();

    @Override
    public int addMedicine(String mName, String createDate, String updateDate) {
        int flag = adminFunctionDao.addMedicine(mName, createDate, updateDate);

        return flag;
    }

    @Override
    public int deleteMedicine(String mName) {
        int flag = adminFunctionDao.deleteMedicine(mName);

        return flag;
    }

    @Override
    public int updateMedicine(String mName, String nMName, String updateDate) {
        int flag = adminFunctionDao.updateMedicine(mName, nMName, updateDate);

        return flag;
    }

    @Override
    public List<Medicine> queryMedicine() {
        List<Medicine> medicineList = adminFunctionDao.queryMedicine();

        return medicineList;
    }

    @Override
    public List<Log> queryLog() {
        List<Log> logList = adminFunctionDao.queryLog();

        return logList;
    }
}
